import os
import sys
import requests
import urllib3
urllib3.disable_warnings()
sys.path.append('./..')

class GetUserInfo():
    def __init__(self, s, host):
        self.s = s
        self.host = host
        self.url = host+'/bsmc/user/getInfo'

    def getUserInfo(self,proxies=None):
        r = self.s.get(url=self.url,verify=False,proxies=proxies).json()
        return r

if __name__ == '__main__':
    from case import getSession
    print(sys.path)
    host = 'https://backstageservices.dreawer.com'
    proxies = {
        "http": "http://127.0.0.1:8888",
        "https": "http://127.0.0.1:8888",
    }
    s = getSession(host=host,proxies=proxies)
    info = GetUserInfo(s,host)
    r = info.getUserInfo(proxies=proxies)
    print(r)